\(\int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx\) [1502]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 177 \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=-\frac {3 (a+b) \left (a^2+7 a b+8 b^2\right ) \log (1-\sin (c+d x))}{16 d}+\frac {3 (a-b) \left (a^2-7 a b+8 b^2\right ) \log (1+\sin (c+d x))}{16 d}-\frac {29 a b^2 \sin (c+d x)}{8 d}-\frac {b^3 \sin ^2(c+d x)}{2 d}-\frac {\sec ^2(c+d x) (8 b+5 a \sin (c+d x)) (a+b \sin (c+d x))^2}{8 d}+\frac {\sec ^3(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x)}{4 d} \]

[Out]

-3/16*(a+b)*(a^2+7*a*b+8*b^2)*ln(1-sin(d*x+c))/d+3/16*(a-b)*(a^2-7*a*b+8*b^2)*ln(1+sin(d*x+c))/d-29/8*a*b^2*si
n(d*x+c)/d-1/2*b^3*sin(d*x+c)^2/d-1/8*sec(d*x+c)^2*(8*b+5*a*sin(d*x+c))*(a+b*sin(d*x+c))^2/d+1/4*sec(d*x+c)^3*
(a+b*sin(d*x+c))^3*tan(d*x+c)/d

Rubi [A] (verified)

Time = 0.25 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2916, 12, 1659, 1643, 647, 31} \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=-\frac {3 (a+b) \left (a^2+7 a b+8 b^2\right ) \log (1-\sin (c+d x))}{16 d}+\frac {3 (a-b) \left (a^2-7 a b+8 b^2\right ) \log (\sin (c+d x)+1)}{16 d}-\frac {29 a b^2 \sin (c+d x)}{8 d}-\frac {\sec ^2(c+d x) (5 a \sin (c+d x)+8 b) (a+b \sin (c+d x))^2}{8 d}+\frac {\tan (c+d x) \sec ^3(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {b^3 \sin ^2(c+d x)}{2 d} \]

[In]

Int[Sec[c + d*x]*(a + b*Sin[c + d*x])^3*Tan[c + d*x]^4,x]

[Out]

(-3*(a + b)*(a^2 + 7*a*b + 8*b^2)*Log[1 - Sin[c + d*x]])/(16*d) + (3*(a - b)*(a^2 - 7*a*b + 8*b^2)*Log[1 + Sin
[c + d*x]])/(16*d) - (29*a*b^2*Sin[c + d*x])/(8*d) - (b^3*Sin[c + d*x]^2)/(2*d) - (Sec[c + d*x]^2*(8*b + 5*a*S
in[c + d*x])*(a + b*Sin[c + d*x])^2)/(8*d) + (Sec[c + d*x]^3*(a + b*Sin[c + d*x])^3*Tan[c + d*x])/(4*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 1643

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*
Pq*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 1659

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq,
a + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + c
*x^2, x], x, 1]}, Simp[(d + e*x)^m*(a + c*x^2)^(p + 1)*((a*g - c*f*x)/(2*a*c*(p + 1))), x] + Dist[1/(2*a*c*(p
+ 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*c*(p + 1)*(d + e*x)*Q - a*e*g*m + c*d*f*(2*p
+ 3) + c*e*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] &
& LtQ[p, -1] && GtQ[m, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 2916

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {b^5 \text {Subst}\left (\int \frac {x^4 (a+x)^3}{b^4 \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {b \text {Subst}\left (\int \frac {x^4 (a+x)^3}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {\sec ^3(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x)}{4 d}+\frac {\text {Subst}\left (\int \frac {(a+x)^2 \left (-a b^4-4 b^4 x-4 a b^2 x^2-4 b^2 x^3\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 b d} \\ & = -\frac {\sec ^2(c+d x) (8 b+5 a \sin (c+d x)) (a+b \sin (c+d x))^2}{8 d}+\frac {\sec ^3(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x)}{4 d}+\frac {\text {Subst}\left (\int \frac {(a+x) \left (b^4 \left (3 a^2+16 b^2\right )+21 a b^4 x+8 b^4 x^2\right )}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^3 d} \\ & = -\frac {\sec ^2(c+d x) (8 b+5 a \sin (c+d x)) (a+b \sin (c+d x))^2}{8 d}+\frac {\sec ^3(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x)}{4 d}+\frac {\text {Subst}\left (\int \left (-29 a b^4-8 b^4 x+\frac {3 \left (a b^4 \left (a^2+15 b^2\right )+8 b^4 \left (a^2+b^2\right ) x\right )}{b^2-x^2}\right ) \, dx,x,b \sin (c+d x)\right )}{8 b^3 d} \\ & = -\frac {29 a b^2 \sin (c+d x)}{8 d}-\frac {b^3 \sin ^2(c+d x)}{2 d}-\frac {\sec ^2(c+d x) (8 b+5 a \sin (c+d x)) (a+b \sin (c+d x))^2}{8 d}+\frac {\sec ^3(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x)}{4 d}+\frac {3 \text {Subst}\left (\int \frac {a b^4 \left (a^2+15 b^2\right )+8 b^4 \left (a^2+b^2\right ) x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^3 d} \\ & = -\frac {29 a b^2 \sin (c+d x)}{8 d}-\frac {b^3 \sin ^2(c+d x)}{2 d}-\frac {\sec ^2(c+d x) (8 b+5 a \sin (c+d x)) (a+b \sin (c+d x))^2}{8 d}+\frac {\sec ^3(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x)}{4 d}-\frac {\left (3 (a-b) \left (a^2-7 a b+8 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{16 d}+\frac {\left (3 (a+b) \left (a^2+7 a b+8 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{16 d} \\ & = -\frac {3 (a+b) \left (a^2+7 a b+8 b^2\right ) \log (1-\sin (c+d x))}{16 d}+\frac {3 (a-b) \left (a^2-7 a b+8 b^2\right ) \log (1+\sin (c+d x))}{16 d}-\frac {29 a b^2 \sin (c+d x)}{8 d}-\frac {b^3 \sin ^2(c+d x)}{2 d}-\frac {\sec ^2(c+d x) (8 b+5 a \sin (c+d x)) (a+b \sin (c+d x))^2}{8 d}+\frac {\sec ^3(c+d x) (a+b \sin (c+d x))^3 \tan (c+d x)}{4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.41 (sec) , antiderivative size = 174, normalized size of antiderivative = 0.98 \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {-3 (a+b) \left (a^2+7 a b+8 b^2\right ) \log (1-\sin (c+d x))+3 (a-b) \left (a^2-7 a b+8 b^2\right ) \log (1+\sin (c+d x))+\frac {(a+b)^3}{(-1+\sin (c+d x))^2}+\frac {(a+b)^2 (5 a+11 b)}{-1+\sin (c+d x)}-48 a b^2 \sin (c+d x)-8 b^3 \sin ^2(c+d x)-\frac {(a-b)^3}{(1+\sin (c+d x))^2}+\frac {(5 a-11 b) (a-b)^2}{1+\sin (c+d x)}}{16 d} \]

[In]

Integrate[Sec[c + d*x]*(a + b*Sin[c + d*x])^3*Tan[c + d*x]^4,x]

[Out]

(-3*(a + b)*(a^2 + 7*a*b + 8*b^2)*Log[1 - Sin[c + d*x]] + 3*(a - b)*(a^2 - 7*a*b + 8*b^2)*Log[1 + Sin[c + d*x]
] + (a + b)^3/(-1 + Sin[c + d*x])^2 + ((a + b)^2*(5*a + 11*b))/(-1 + Sin[c + d*x]) - 48*a*b^2*Sin[c + d*x] - 8
*b^3*Sin[c + d*x]^2 - (a - b)^3/(1 + Sin[c + d*x])^2 + ((5*a - 11*b)*(a - b)^2)/(1 + Sin[c + d*x]))/(16*d)

Maple [A] (verified)

Time = 0.98 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.60

method result size
derivativedivides \(\frac {a^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+3 a^{2} b \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{3} \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(284\)
default \(\frac {a^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+3 a^{2} b \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{3} \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(284\)
parallelrisch \(\frac {96 b \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}+b^{2}\right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-12 \left (a^{2}+7 a b +8 b^{2}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a +b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+12 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}-7 a b +8 b^{2}\right ) \left (a -b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-24 a^{2} b -9 b^{3}\right ) \cos \left (2 d x +2 c \right )+\left (18 a^{2} b +12 b^{3}\right ) \cos \left (4 d x +4 c \right )+\left (-10 a^{3}-90 a \,b^{2}\right ) \sin \left (3 d x +3 c \right )+b^{3} \cos \left (6 d x +6 c \right )-12 \sin \left (5 d x +5 c \right ) a \,b^{2}+\left (6 a^{3}-30 a \,b^{2}\right ) \sin \left (d x +c \right )+6 a^{2} b -4 b^{3}}{8 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(305\)
norman \(\frac {\frac {\left (48 a^{2} b +16 b^{3}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (48 a^{2} b +16 b^{3}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 \left (2 a^{2} b +2 b^{3}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 \left (2 a^{2} b +2 b^{3}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (6 a^{2} b +6 b^{3}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (6 a^{2} b +6 b^{3}\right ) \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {3 a \left (a^{2}+15 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a \left (a^{2}+15 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {a \left (a^{2}+15 b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {3 a \left (a^{2}+15 b^{2}\right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {3 a \left (5 a^{2}+11 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (35 a^{2}+141 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {a \left (35 a^{2}+141 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {3 \left (a^{3}-8 a^{2} b +15 a \,b^{2}-8 b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}-\frac {3 \left (a^{3}+8 a^{2} b +15 a \,b^{2}+8 b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {3 b \left (a^{2}+b^{2}\right ) \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(489\)
risch \(\frac {3 i a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {6 i b^{3} c}{d}+\frac {b^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {6 i a^{2} b c}{d}+3 i a^{2} b x +\frac {b^{3} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+3 i b^{3} x -\frac {3 i a \,b^{2} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {{\mathrm e}^{i \left (d x +c \right )} \left (-5 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-27 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+3 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-3 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+48 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}+24 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-3 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+3 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+48 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+32 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+5 i a^{3}+27 i a \,b^{2}+48 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}+24 b^{3} {\mathrm e}^{i \left (d x +c \right )}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{3}}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2} b}{d}+\frac {45 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a \,b^{2}}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{3}}{d}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2} b}{d}-\frac {45 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a \,b^{2}}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{3}}{d}\) \(531\)

[In]

int(sec(d*x+c)^5*sin(d*x+c)^4*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*(1/4*sin(d*x+c)^5/cos(d*x+c)^4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/8*sin(d*x+c)^3-3/8*sin(d*x+c)+3/8*ln(s
ec(d*x+c)+tan(d*x+c)))+3*a^2*b*(1/4*tan(d*x+c)^4-1/2*tan(d*x+c)^2-ln(cos(d*x+c)))+3*a*b^2*(1/4*sin(d*x+c)^7/co
s(d*x+c)^4-3/8*sin(d*x+c)^7/cos(d*x+c)^2-3/8*sin(d*x+c)^5-5/8*sin(d*x+c)^3-15/8*sin(d*x+c)+15/8*ln(sec(d*x+c)+
tan(d*x+c)))+b^3*(1/4*sin(d*x+c)^8/cos(d*x+c)^4-1/2*sin(d*x+c)^8/cos(d*x+c)^2-1/2*sin(d*x+c)^6-3/4*sin(d*x+c)^
4-3/2*sin(d*x+c)^2-3*ln(cos(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.18 \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {8 \, b^{3} \cos \left (d x + c\right )^{6} - 4 \, b^{3} \cos \left (d x + c\right )^{4} + 3 \, {\left (a^{3} - 8 \, a^{2} b + 15 \, a b^{2} - 8 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (a^{3} + 8 \, a^{2} b + 15 \, a b^{2} + 8 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 12 \, a^{2} b + 4 \, b^{3} - 24 \, {\left (2 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (24 \, a b^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{3} - 6 \, a b^{2} + {\left (5 \, a^{3} + 27 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^4*(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/16*(8*b^3*cos(d*x + c)^6 - 4*b^3*cos(d*x + c)^4 + 3*(a^3 - 8*a^2*b + 15*a*b^2 - 8*b^3)*cos(d*x + c)^4*log(si
n(d*x + c) + 1) - 3*(a^3 + 8*a^2*b + 15*a*b^2 + 8*b^3)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 12*a^2*b + 4*b^
3 - 24*(2*a^2*b + b^3)*cos(d*x + c)^2 - 2*(24*a*b^2*cos(d*x + c)^4 - 2*a^3 - 6*a*b^2 + (5*a^3 + 27*a*b^2)*cos(
d*x + c)^2)*sin(d*x + c))/(d*cos(d*x + c)^4)

Sympy [F(-1)]

Timed out. \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**4*(a+b*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.07 \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=-\frac {8 \, b^{3} \sin \left (d x + c\right )^{2} + 48 \, a b^{2} \sin \left (d x + c\right ) - 3 \, {\left (a^{3} - 8 \, a^{2} b + 15 \, a b^{2} - 8 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (a^{3} + 8 \, a^{2} b + 15 \, a b^{2} + 8 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left ({\left (5 \, a^{3} + 27 \, a b^{2}\right )} \sin \left (d x + c\right )^{3} - 18 \, a^{2} b - 10 \, b^{3} + 12 \, {\left (2 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )^{2} - 3 \, {\left (a^{3} + 7 \, a b^{2}\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^4*(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/16*(8*b^3*sin(d*x + c)^2 + 48*a*b^2*sin(d*x + c) - 3*(a^3 - 8*a^2*b + 15*a*b^2 - 8*b^3)*log(sin(d*x + c) +
1) + 3*(a^3 + 8*a^2*b + 15*a*b^2 + 8*b^3)*log(sin(d*x + c) - 1) - 2*((5*a^3 + 27*a*b^2)*sin(d*x + c)^3 - 18*a^
2*b - 10*b^3 + 12*(2*a^2*b + b^3)*sin(d*x + c)^2 - 3*(a^3 + 7*a*b^2)*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x
 + c)^2 + 1))/d

Giac [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.25 \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=-\frac {8 \, b^{3} \sin \left (d x + c\right )^{2} + 48 \, a b^{2} \sin \left (d x + c\right ) - 3 \, {\left (a^{3} - 8 \, a^{2} b + 15 \, a b^{2} - 8 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, {\left (a^{3} + 8 \, a^{2} b + 15 \, a b^{2} + 8 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (18 \, a^{2} b \sin \left (d x + c\right )^{4} + 18 \, b^{3} \sin \left (d x + c\right )^{4} + 5 \, a^{3} \sin \left (d x + c\right )^{3} + 27 \, a b^{2} \sin \left (d x + c\right )^{3} - 12 \, a^{2} b \sin \left (d x + c\right )^{2} - 24 \, b^{3} \sin \left (d x + c\right )^{2} - 3 \, a^{3} \sin \left (d x + c\right ) - 21 \, a b^{2} \sin \left (d x + c\right ) + 8 \, b^{3}\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^4*(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/16*(8*b^3*sin(d*x + c)^2 + 48*a*b^2*sin(d*x + c) - 3*(a^3 - 8*a^2*b + 15*a*b^2 - 8*b^3)*log(abs(sin(d*x + c
) + 1)) + 3*(a^3 + 8*a^2*b + 15*a*b^2 + 8*b^3)*log(abs(sin(d*x + c) - 1)) - 2*(18*a^2*b*sin(d*x + c)^4 + 18*b^
3*sin(d*x + c)^4 + 5*a^3*sin(d*x + c)^3 + 27*a*b^2*sin(d*x + c)^3 - 12*a^2*b*sin(d*x + c)^2 - 24*b^3*sin(d*x +
 c)^2 - 3*a^3*sin(d*x + c) - 21*a*b^2*sin(d*x + c) + 8*b^3)/(sin(d*x + c)^2 - 1)^2)/d

Mupad [B] (verification not implemented)

Time = 12.03 (sec) , antiderivative size = 449, normalized size of antiderivative = 2.54 \[ \int \sec (c+d x) (a+b \sin (c+d x))^3 \tan ^4(c+d x) \, dx=\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (3\,a^2\,b+3\,b^3\right )}{d}-\frac {\left (-\frac {3\,a^3}{4}-\frac {45\,a\,b^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+\left (-6\,a^2\,b-6\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\left (\frac {5\,a^3}{4}+\frac {75\,a\,b^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (12\,a^2\,b+12\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\left (\frac {15\,a^3}{2}+\frac {33\,a\,b^2}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (36\,a^2\,b+4\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (\frac {15\,a^3}{2}+\frac {33\,a\,b^2}{2}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (12\,a^2\,b+12\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (\frac {5\,a^3}{4}+\frac {75\,a\,b^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (-6\,a^2\,b-6\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (-\frac {3\,a^3}{4}-\frac {45\,a\,b^2}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a+b\right )\,\left (a^2+7\,a\,b+8\,b^2\right )}{8\,d}+\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a-b\right )\,\left (a^2-7\,a\,b+8\,b^2\right )}{8\,d} \]

[In]

int((sin(c + d*x)^4*(a + b*sin(c + d*x))^3)/cos(c + d*x)^5,x)

[Out]

(log(tan(c/2 + (d*x)/2)^2 + 1)*(3*a^2*b + 3*b^3))/d - (tan(c/2 + (d*x)/2)^5*((33*a*b^2)/2 + (15*a^3)/2) - tan(
c/2 + (d*x)/2)*((45*a*b^2)/4 + (3*a^3)/4) + tan(c/2 + (d*x)/2)^7*((33*a*b^2)/2 + (15*a^3)/2) - tan(c/2 + (d*x)
/2)^11*((45*a*b^2)/4 + (3*a^3)/4) + tan(c/2 + (d*x)/2)^3*((75*a*b^2)/4 + (5*a^3)/4) + tan(c/2 + (d*x)/2)^9*((7
5*a*b^2)/4 + (5*a^3)/4) - tan(c/2 + (d*x)/2)^2*(6*a^2*b + 6*b^3) - tan(c/2 + (d*x)/2)^10*(6*a^2*b + 6*b^3) + t
an(c/2 + (d*x)/2)^4*(12*a^2*b + 12*b^3) + tan(c/2 + (d*x)/2)^8*(12*a^2*b + 12*b^3) + tan(c/2 + (d*x)/2)^6*(36*
a^2*b + 4*b^3))/(d*(2*tan(c/2 + (d*x)/2)^2 + tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2
)^8 + 2*tan(c/2 + (d*x)/2)^10 - tan(c/2 + (d*x)/2)^12 - 1)) - (3*log(tan(c/2 + (d*x)/2) - 1)*(a + b)*(7*a*b +
a^2 + 8*b^2))/(8*d) + (3*log(tan(c/2 + (d*x)/2) + 1)*(a - b)*(a^2 - 7*a*b + 8*b^2))/(8*d)